<include file="../Public/header" />


</head>
<body>
<div id="container">
    <form method="get" id="cache">
        <table width="100%" border="0" cellpadding="4" cellspacing="0" class="form">
            <tr class="top">
                <td colspan="2" class="tit">清空缓存</td>
            </tr>
            <tr>
                <th width="160" valign="top" class="th">&nbsp;</th>
                <td class="td"><input name="type" type="radio" value="0" checked="checked"/>
                    默认值清除应用缓存，数据库字段缓存。（修改表结构，应用代码后）</td>
            </tr>
            <tr>
                <th class="th" valign="top">&nbsp;</th>
                <td class="td"><input name="type" type="radio" value="site" />
                    只清除网站配置（后台修改了网站的配置时，如 白名单）</td>
            </tr>
            <tr>
                <th class="th" valign="top">&nbsp;</th>
                <td class="td"><input name="type" type="radio" value="portal" />
                    清除门户缓存</td>
            </tr>
            <tr>
                <th class="th" valign="top">&nbsp;</th>
                <td class="td"><input name="type" type="radio" value="all" />
                    清除网站配置，模板缓存，数据库字段缓存，应用配置缓存(全部缓存)</td>
            </tr>
            <tr>
                <th valign="top">&nbsp;</th>
                <td class="td"><input type="button" class="button" value="开始清理" onClick="cleancache()"/></td>
            </tr>
        </table>
    </form>
</div>
<div id="container">
    <form method="post" id="feed" action="{:U('admin/Clean/doCleanFeed')}" onSubmit="return makesure()">
        <table width="100%" border="0" cellpadding="4" cellspacing="0" class="form">
            <tr class="top">
                <td width="160" colspan="5" class="tit">清空动态&nbsp;（共有{$count}条动态）</td>
            </tr>
            <tr class="top">
                <td align="center" class="tit"><input type="submit" name="dataType" value="清除30天前的动态" /></td>
                <td align="center" class="tit"><input type="submit" name="dataType" value="清除60天前的动态" /></td>
                <td align="center" class="tit"><input type="submit" name="dataType" value="清除90天前的动态" /></td>
                <td align="center" class="tit"><input type="submit" name="dataType" value="清除180天前的动态" /></td>
                <td align="center" class="tit"><input type="submit" name="dataType" value="清除360天前的动态" /></td>
            </tr>
        </table>
    </form>
</div>
</body>
</html>
<script type="text/javascript" src="__PUBLIC__/js/jquery.js"></script>
<script type="text/javascript">
function cleancache(){
	 var type = $("input[name='type']:checked").val();
	 var url = "__ROOT__/cleancache.php";
	 if(type!=0){
		 url += "?"+type;
	 }
	 window.location.href = url;
}

function makesure(){
  if(window.confirm('确认清除')) return true
  else return false;
}
</script>